Skip to content

fix(notify): name the binding window and weekly headroom - #2

Merged
lroolle merged 2 commits into
mainfrom
feat/session-limit-clarity
Sep 2, 2026
Merged

fix(notify): name the binding window and weekly headroom#2
lroolle merged 2 commits into
mainfrom
feat/session-limit-clarity

Conversation

@lroolle

@lroolle lroolle commented Sep 2, 2026

Copy link
Copy Markdown
Member

What & why

A spent 5h session window is not an exhausted week. Current Claude Code may offer /low-priority at that wall, but the gated offer, active state, and separate allowance are not present in /api/oauth/usage. ccpace should therefore state the relationship it can prove without impersonating session state.

This PR changes the block to say 5h capped · 47% of 7d left · back @Wed 2 04:00, renders endpoint values at or above 100 as cap, and suppresses 100-to-101 delta noise.

It also fixes a concrete notification contract bug: producers emitted five_util, five_delta, and reset_time, while the formatter read utilization, delta, and reset_short, producing messages such as 0% (+0%) reset. Notifications now use canonical window, utilization, reset_at, and reset_time fields, retain the old aliases for existing custom hooks, and carry a stable custom-notifier event ID such as full:work:5h:<reset>. The watch frame renders through the same formatter, so it cannot drift separately again.

Sibling implementation: thevibeworks/claude-code-statusline#38 can prove /low-priority offer/active state from the current session transcript; ccpace deliberately cannot and does not claim it.

Verification

  • make check: 85 passed
  • uv build: wheel and sdist built
  • real cached 101% / 53% / scoped-100% payload replayed through the block
  • git diff --check passes
  • staged privacy scan found no credentials, session IDs, emails, account names, or local paths

Cache follow-up: 5h and scoped caps no longer freeze the account. Only aggregate 7d exhaustion without a paid path is terminal; manual refresh and a newer shared statusline cache evict that snapshot. Five polling regression tests cover these boundaries.

@lroolle
lroolle merged commit 6c1785d into main Sep 2, 2026
2 checks passed
@lroolle
lroolle deleted the feat/session-limit-clarity branch September 2, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant